package chapter03

import org.apache.spark.{SparkConf, SparkContext}

object Test09_FlatMap {
  def main(args: Array[String]): Unit = {
    val conf = new SparkConf().setMaster("local[*]").setAppName("flatmap")
    val sc = new SparkContext(conf)
    //扁平化
    val value = sc.makeRDD(List(List(1, 2, 3), List(4, 5, 6)))
    val value1 = value.flatMap(e => e)
    println(value1.collect().toList)
  }
}
